//
//  UIButton+Extension.swift
//  TWeibo
//
//  Created by wtw on 15/8/3.
//  Copyright © 2015年 wtw. All rights reserved.
//

import UIKit

extension UIButton {
    convenience init(title: String,imageName: String,fontSize: CGFloat = 12,color: UIColor = UIColor.darkGrayColor()) {
        self.init()
        setTitle(title, forState: UIControlState.Normal)
        setImage(UIImage(named: imageName), forState: UIControlState.Normal)
        setTitleColor(color, forState: UIControlState.Normal)
        titleLabel?.font = UIFont.systemFontOfSize(fontSize)
    }
}
